import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

FlatButton buildFlatButton() {
  return new FlatButton(
    child: new Text('FlatButton'),
    onPressed: () {},
  );
}

RaisedButton buildRaisedButton() {
  return new RaisedButton(
    child: new Text('RaisedButton'),
    onPressed: () {},
  );
}

IconButton buildIconButton0() {
  return new IconButton(
    icon: new Icon(Icons.add_circle),
    onPressed: () {},
  );
}

FloatingActionButton buildFloatingActionButton() {
  return new FloatingActionButton(
    child: new Icon(Icons.add_a_photo),
    onPressed: () {},
  );
}

IconButton buildIconButton1() {
  return new IconButton(
    icon: ImageIcon(AssetImage("images/test.png")),
    onPressed: () {},
  );
}

MaterialButton buildMaterialButton() {
  return new MaterialButton(
    color: Colors.blue,
    textColor: Colors.white,
    child: new Text('MaterialButton'),
    onPressed: () {},
  );
}

DropdownButton<String> buildDropdownButton() {
  return new DropdownButton<String>(
    onChanged: (String newValue) {},
    items: <String>['Menu1', 'Menu2', 'Menu3', 'Menu4']
        .map<DropdownMenuItem<String>>((String value) {
      return DropdownMenuItem<String>(
        value: value,
        child: Text(value),
      );
    }).toList(),
  );
}

OutlineButton buildOutlineButton(BuildContext context) {
  return new OutlineButton(
    borderSide: new BorderSide(color: Theme.of(context).primaryColor),
    child: new Text(
      '线框按钮',
    ),
    onPressed: () {},
  );
}
